<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditEventsTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditEventsLabel_eventId}" for="eventId" />
                    <h:inputText id="eventId" value="#{eventsController.selected.eventId}" title="#{bundle.EditEventsTitle_eventId}" required="true" requiredMessage="#{bundle.EditEventsRequiredMessage_eventId}"/>
                    <h:outputLabel value="#{bundle.EditEventsLabel_eventName}" for="eventName" />
                    <h:inputText id="eventName" value="#{eventsController.selected.eventName}" title="#{bundle.EditEventsTitle_eventName}" />
                    <h:outputLabel value="#{bundle.EditEventsLabel_eventYear}" for="eventYear" />
                    <h:inputText id="eventYear" value="#{eventsController.selected.eventYear}" title="#{bundle.EditEventsTitle_eventYear}" />
                    <h:outputLabel value="#{bundle.EditEventsLabel_eventMonth}" for="eventMonth" />
                    <h:inputText id="eventMonth" value="#{eventsController.selected.eventMonth}" title="#{bundle.EditEventsTitle_eventMonth}" />
                    <h:outputLabel value="#{bundle.EditEventsLabel_eventDay}" for="eventDay" />
                    <h:inputText id="eventDay" value="#{eventsController.selected.eventDay}" title="#{bundle.EditEventsTitle_eventDay}" />
                    <h:outputLabel value="#{bundle.EditEventsLabel_eventHour}" for="eventHour" />
                    <h:inputText id="eventHour" value="#{eventsController.selected.eventHour}" title="#{bundle.EditEventsTitle_eventHour}" />
                    <h:outputLabel value="#{bundle.EditEventsLabel_eventMinute}" for="eventMinute" />
                    <h:inputText id="eventMinute" value="#{eventsController.selected.eventMinute}" title="#{bundle.EditEventsTitle_eventMinute}" />
                    <h:outputLabel value="#{bundle.EditEventsLabel_duration}" for="duration" />
                    <h:inputText id="duration" value="#{eventsController.selected.duration}" title="#{bundle.EditEventsTitle_duration}" />
                    <h:outputLabel value="#{bundle.EditEventsLabel_location}" for="location" />
                    <h:inputText id="location" value="#{eventsController.selected.location}" title="#{bundle.EditEventsTitle_location}" />
                    <h:outputLabel value="#{bundle.EditEventsLabel_private1}" for="private1" />
                    <h:inputText id="private1" value="#{eventsController.selected.private1}" title="#{bundle.EditEventsTitle_private1}" />
                    <h:outputLabel value="#{bundle.EditEventsLabel_shared}" for="shared" />
                    <h:inputText id="shared" value="#{eventsController.selected.shared}" title="#{bundle.EditEventsTitle_shared}" />
                    <h:outputLabel value="#{bundle.EditEventsLabel_desiredWeather}" for="desiredWeather" />
                    <h:inputText id="desiredWeather" value="#{eventsController.selected.desiredWeather}" title="#{bundle.EditEventsTitle_desiredWeather}" required="true" requiredMessage="#{bundle.EditEventsRequiredMessage_desiredWeather}"/>
                    <h:outputLabel value="#{bundle.EditEventsLabel_forcWeatherType}" for="forcWeatherType" />
                    <h:inputText id="forcWeatherType" value="#{eventsController.selected.forcWeatherType}" title="#{bundle.EditEventsTitle_forcWeatherType}" />
                    <h:outputLabel value="#{bundle.EditEventsLabel_forcTemp}" for="forcTemp" />
                    <h:inputText id="forcTemp" value="#{eventsController.selected.forcTemp}" title="#{bundle.EditEventsTitle_forcTemp}" />
                    <h:outputLabel value="#{bundle.EditEventsLabel_forcRainProb}" for="forcRainProb" />
                    <h:inputText id="forcRainProb" value="#{eventsController.selected.forcRainProb}" title="#{bundle.EditEventsTitle_forcRainProb}" />
                    <h:outputLabel value="#{bundle.EditEventsLabel_forcWind}" for="forcWind" />
                    <h:inputText id="forcWind" value="#{eventsController.selected.forcWind}" title="#{bundle.EditEventsTitle_forcWind}" />
                    <h:outputLabel value="#{bundle.EditEventsLabel_forcHumidity}" for="forcHumidity" />
                    <h:inputText id="forcHumidity" value="#{eventsController.selected.forcHumidity}" title="#{bundle.EditEventsTitle_forcHumidity}" />
                    <h:outputLabel value="#{bundle.EditEventsLabel_creator}" for="creator" />
                    <h:selectOneMenu id="creator" value="#{eventsController.selected.creator}" title="#{bundle.EditEventsTitle_creator}" required="true" requiredMessage="#{bundle.EditEventsRequiredMessage_creator}">
                        <f:selectItems value="#{usersController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{eventsController.update}" value="#{bundle.EditEventsSaveLink}"/>
                <br />
                <br />
                <h:link outcome="View" value="#{bundle.EditEventsViewLink}"/>
                <br />
                <h:commandLink action="#{eventsController.prepareList}" value="#{bundle.EditEventsShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.EditEventsIndexLink}" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
